home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / appletalk / uab.shar / gw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-12  |  2.5 KB  |  97 lines

  1. /*
  2.  * $Author: cck $ $Date: 88/09/14 10:19:34 $
  3.  * $Header: /src/local/mac/cap/etalk/RCS/gw.h,v 1.14 88/09/14 10:19:34 cck Rel $
  4.  * $Revision: 1.14 $
  5. */
  6.  
  7. /*
  8.  * gw.h - common definitions for our bridge
  9.  *
  10.  *
  11.  * Copyright (c) 1988 by The Trustees of Columbia University 
  12.  *  in the City of New York.
  13.  *
  14.  * Permission is granted to any individual or institution to use,
  15.  * copy, or redistribute this software so long as it is not sold for
  16.  * profit, provided that this notice and the original copyright
  17.  * notices are retained.  Columbia University nor the author make no
  18.  * representations about the suitability of this software for any
  19.  * purpose.  It is provided "as is" without express or implied
  20.  * warranty.
  21.  *
  22.  *
  23.  * Edit History:
  24.  *
  25.  *  August, 1988  CCKim Created
  26.  *
  27. */
  28.  
  29. #include "node.h"
  30. #include "ddpport.h"
  31.  
  32. /* probably shouldn't be defined here */
  33. #ifndef DDP_BROADCAST_NODE
  34. # define DDP_BROADCAST_NODE 0xff /* broadcast ddp node */
  35. #endif
  36.  
  37. /*
  38.  * a route entry describes a routing to a ddp network
  39.  *
  40.  * Most of the items are taken pretty much from inside appletalk.
  41.  * 
  42.  * The bridge "lap" id is stored as a pointer to a node address to
  43.  * minimize the comparision overhead (though it produces a consistency
  44.  * and lookup efficiency problem)--with a pointer we need only compare
  45.  * two addreses.
  46.  *
  47. */
  48. struct route_entry {
  49.   struct route_entry *re_next;    /* next route entry */
  50.   PORT_T re_port;        /* port network is attached to */
  51.   NODE *re_bridgeid_p;        /* bridge (lap level id) pointer */
  52.   word re_ddp_net;        /* network we are routing */
  53.   int re_dist;            /* distance (hops for now) */
  54.   int re_state;            /* state of network */
  55.   byte *re_zonep;        /* zone pascal string (NULL means none) */
  56.   int re_zip_taken;        /* zip takedown in effect */
  57.   int re_zip_helper;        /* just a helper var */
  58. };
  59.  
  60. /* log levels */
  61. #define LOG_LOG 0        /* always */
  62. #define LOG_PRIMARY 1        /* primary information */
  63. #define LOG_BASE 4        /* base info */
  64. #define LOG_LOTS 6        /* lots of good info */
  65. #define LOG_JUNK 8        /* starting to get into junk here */
  66.  
  67. /* function declarations */
  68. /* rtmp.c */
  69. void rtmp_init();
  70. void rtmp_start();
  71.  
  72. struct route_entry *route_find();
  73. struct route_entry *route_list_start();
  74. struct route_entry *route_next();
  75. int route_add_host_entry();
  76.  
  77. char *node_format();
  78.  
  79. byte *zone_find();
  80.  
  81. void rtmp_dump_stats();
  82. void rtmp_dump_table();
  83.  
  84.  
  85. /* ethertalk.c */
  86. PORT_T ethertalk_init();
  87.  
  88. /* ddproute.c */
  89. void ddp_route_init();
  90. void ddp_route_start();
  91. void sddp_route();
  92. void ddp_route();
  93. int ddp_open();        /* local ddp routines (input via listener) */
  94. void ddp_output();
  95. void ddp_dump_stats();
  96.  
  97.